<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    .outer {
      width: 800px;
      height: 200px;
      border: solid 5px;
    }


    .inner{
      width: 200px;
      height: 200px;
      background-color: #bfa;
    /*水平居中 于父元素*/
      margin: 0 auto;
    }
  </style>
</head>
<body>
<div class="outer">
  <div class="inner">

  </div>
</div>
</body>
</html>